CC = gcc -Wall

all:	libredblack.a rb-tree
	cat AFTER_INSTALL

rb-tree: libredblack.a rb-tree.c rb-tree.h util.o
	${CC} -o rb-tree rb-tree.c util.o -L. -lredblack

util.o: util.c util.h
	${CC} -c util.c -o util.o

libredblack.a:	redblack.o util.o
	ar cru libredblack.a redblack.o util.o

redblack.o: redblack.c redblack.h
	${CC} -c redblack.c -o redblack.o

clean:
	rm -rf rb-tree redblack.o util.o libredblack.a
